package cn.yang.mapper;

import cn.yang.domain.UserScores;
import cn.yang.domain.vo.USVO;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

/**
* @author Administrator
* @description 针对表【user_scores】的数据库操作Mapper
* @createDate 2025-03-05 13:50:28
* @Entity cn.yang.domain.UserScores
*/
public interface UserScoresMapper extends BaseMapper<UserScores> {

    @Select("SELECT u.username, s.score\n" +
            "FROM users u\n" +
            "LEFT JOIN user_scores s ON u.id = s.user_id\n" +
            "WHERE u.id = 1;")
    List<USVO> getScore();
}




